<!DOCTYPE html>
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Page Title</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" type="text/css" media="screen" href="main.css" />
    <script src="全选与取消全选.js"></script>
</head>
<body>

    看书：<input type="checkbox" name="checkbox" value=1><br>
    写字：<input type="checkbox" name="checkbox"value=2><br>
    打飞机：<input type="checkbox" name="checkbox"value=3><br>
    玩游戏：<input type="checkbox" name="checkbox"value=4><br>
    
<button onclick="checkboxed('checkbox')">全选</button>
<button onclick="uncheckboxed('checkbox')">取消全选</button>
</body>
</html>



